Lightweight Polymorphic Effects

نویسندگان

  • Lukas Rytz
  • Martin Odersky
  • Philipp Haller
چکیده

Type-and-effect systems are a well-studied approach for reasoning about the computational behavior of programs. Nevertheless, there is only one example of an effect system that has been adopted in a wide-spread industrial language: Java’s checked exceptions. We believe that the main obstacle to using effect systems in day-to-day programming is their verbosity, especially when writing functions that are polymorphic in the effect of their argument. To overcome this issue, we propose a new syntactically lightweight technique for writing effectpolymorphic functions. We show its independence from a specific kind of side-effect by embedding it into a generic and extensible framework for checking effects of multiple domains. Finally, we verify the expressiveness and practicality of the system by implementing it for the Scala programming language.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Lightweight Polymorphic Effects - Proofs

This technical report presents the full proofs for the type preservation and effect soundness theorems of the type system presented in the article “Lightweight Polymorphic Effects”.

متن کامل

Generating Code with Polymorphic let: A Ballad of Value Restriction, Copying and Sharing

Getting polymorphism and effects such as mutation to live together in the same language is a tale worth telling, under the recurring refrain of copying vs. sharing. We add new stanzas to the tale, about the ordeal to generate code with polymorphism and effects, and be sure it type-checks. Generating well-typed–by–construction polymorphic let-expressions is impossible in the Hindley-Milner type ...

متن کامل

Lightweight Lemmas in Prolog 1

Prolog is known to be well-suited for expressing and implementing logics and inference systems. We show that lemmas and deenitions in such logics can be implemented with a great economy of expression. We encode a polymorphic higher-order logic using the ML-style polymorphism of Prolog. The terms of the metalanguage (Prolog) can be used to express the statement of a lemma, and metalanguage type-...

متن کامل

Flexural Behavior of Lightweight Concrete Beams Reinforced with GFRP Bars and Effects of the Added Micro and Macro Fiber

This study evaluated the effect of macro steel fiber (SF), micro glass fiber (GF) and micro polypropylene fiber (PF) in lightweight aggregate concrete, (LWAC) beams reinforced with glass fiber reinforced polymer (GFRP) bars. Firstly, concrete mixtures with different volume fractions of GF, PF and SF were tested up to compressive strength, then determine the optimum fiber content GF, PF and SF a...

متن کامل

MODELING FLEXURAL STRENGTH OF EPS LIGHTWEIGHT CONCRETE USING REGRESSION, NEURAL NETWORK AND ANFIS

Lightweight concrete (LWC) is a kind of concrete that made of lightweight aggregates or gas bubbles. These aggregates could be natural or artificial, and expanded polystyrene (EPS) lightweight concrete is the most interesting lightweight concrete and has good mechanical properties. Bulk density of this kind of concrete is between 300-2000 kg/m3. In this paper flexural strength of EPS is modeled...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2012